package com.hephesto.dao.toplink;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import com.hephesto.dao.IBankDao;
import com.hephesto.model.bank.Bank;

public class ToplinkBankDao implements IBankDao {

	private static EntityManagerFactory emf;
	private EntityManager em;
	
	public ToplinkBankDao() {
		emf = Persistence.createEntityManagerFactory("hephesto");
		em = emf.createEntityManager();
	}
	
	public void persist( Bank b) {
		em.getTransaction().begin();
		em.persist(b);
		em.getTransaction().commit();
		System.out.println(  );
	}
	
}